from django.urls import path, include

from .. import views
from ..views.frontends import configs, menu, model, roles, product, myupload, orders, powerlog
from ..views.sms import sms_code

from ..views.backand import redeem_handler

from ..views.test import multiply_upload

# urlpatterns = [
#     path('user/session', views.user.session),
#     path('config/get', views.user.config),
#     path('menu/list', views.user.menu),
#     path('model/list', views.user.model),
#     path('chat/list', views.user.chat),
#     path('chat/history', views.user.history),
#     path('role/list', views.user.role),
#     path('user/login', views.user.login),
#     path('payment/payWays', views.user.payment),
#     path('product/list', views.user.product),
# ]

urlpatterns = [
    path('user/', include('aiapi.urls.frontends.users')),

    # 后台模块
    path('admin/', include('aiapi.urls.backand.users')),

    # 支付模块
    path('payment/', include('aiapi.urls.payments.urls')),

    # 验证码模块
    path('captcha/', include('aiapi.urls.captcha.urls')),

    # DALL-E-3
    path('dall/', include('aiapi.urls.dall.urls')),

    # # 卡密功能
    # path('dall/', include('aiapi.urls.dall.urls')),

    # 发送验证码模块
    path('sms/code', sms_code.send_code),

    # 基础配置
    path('config/get', configs.config_get),

    # 获取菜单
    path('menu/list', menu.menu_list),

    # 对话
    path('chat/', include('aiapi.urls.chats.fe_urls')),

    # 获取模型
    path('model/list', model.model_list),

    # 获取角色
    path('role/list', roles.roles_list),
    path('role/update', roles.roles_update),    # 占位

    # product
    path('product/list', product.product_list),

    # 上传文件
    path('upload', myupload.upload_file, name='multiply_upload'),
    path('upload/list', myupload.upload_list),
    path('upload/remove', myupload.upload_remove),

    # 获取账单信息
    path('order/list', orders.orders_list),

    # 获取算力日志
    path('powerLog/list', powerlog.powerlog_list),

    # 兑换码 兑换算力
    path('redeem/verify', redeem_handler.redeem_verify),
]

